package com.road2trip.restlet;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Router;


public class RestletApplication extends Application {

    /**
     * Creates a root Restlet that will receive all incoming calls.
     */
    @Override
    public Restlet createInboundRoot() {
        // Create a router Restlet that routes each call to a servlet
        Router router = new Router(getContext());
        
        router.attach("/places/", PlacesResource.class);  
        router.attach("/place/{place}", PlaceResource.class);           

        router.attachDefault(R2TIndexResource.class);
        return router;
    }
}